<template>
  <div>
    <el-container>
      <el-main>
        <!-- <div v-html="info.proName" class="info-proName"></div>
        <div class="info-title">活动简介</div> -->
        <div v-html="info.richText" class="ql-editor info-content"></div>
      </el-main>
    </el-container>
  </div>
  <PreviewDialog v-model="dialogVisible" :infor="currentInfor"></PreviewDialog>
</template>
<script setup name="ProjectDetail">
import PreviewDialog from "./previewDialog.vue";
import { ref } from "vue";
import { getProjectInfo } from "@/api/home/home";
import {
  getProblems
} from "@/api/pms/project";
const { proxy } = getCurrentInstance();
const dialogVisible = defineModel();
const route = useRoute();
const router = useRouter();
const info = ref({});
const currentInfor = ref({});
const props = defineProps({
  projectId: {
    type: String,
  },
});

function getInfo() {
  getProblems({ proId: props.projectId }).then((res) => {
    info.value = res.data;
  });
}
/** 下载文件 */
function download(item) {
  proxy.download(
    "/common/download",
    {
      fileName: item.url.replace("/profile/upload", ""),
      delete: false,
    },
    item.name
  );
}
//打开在线预览弹窗
function preview(item) {
  currentInfor.value = item;
  dialogVisible.value = true;
}
onMounted(() => {
  getInfo();
});
</script>
<style lang="scss" scoped>
.info-proName {
  font-weight: bold;
}
.info-title {
  margin: 20px 0;
  border-left: 3px solid rgb(64, 158, 255);
  padding: 0 10px;
}
.task-title {
  font-weight: bold;
  padding: 10px 0;
}
.task-time {
  color: rgb(112, 112, 112);
}
.info-content {
  white-space: pre-wrap;
}
.information-list{
  font-size: 14px;
  margin: 10px 0;
}
</style>
